<?php


class Somi_Form_Auto extends Zend_Dojo_Form
    {

	   public function init()

	    {
	    	#$this->setAction('/test/index/test');
		$this->setMethod('post');
		$this->setName('Filter');
		$this->addAttribs(array('accept-charset' => 'utf-8'));
		
		
		require_once APPLICATION_BASE.'/library/Somi/Validate/ErrorMessageDe.php';
		
		$translateValidators= new Somi_Validate_ErrorMessageDe();
		$translator = new Zend_Translate('array', $translateValidators->getTranslate());
    	Zend_Validate_Abstract::setDefaultTranslator($translator);
    	
    	$this->clearDecorators();
	
	
		$formDecorators=array(
		'formElements',
		array('HtmlTag',array('tag'=>'dl','class'=>'zend_form')),
		'Form',
		);
		
		$elementDecorators=array(
		'ViewHelper',
		'Errors',
		array(array('data'=>'HtmlTag'),array('tag'=>'div','class'=>'element')),
		array('Label',array('class'=>'left','requiredSuffix' => '*')),
		array(array('row'=>'HtmlTag'),array('tag'=>'div','class'=>'row')),
		);
		
		$buttonDecorators=array(
		'ViewHelper',
		array(array('data'=>'HtmlTag'),array('tag'=>'div','class'=>'buttonrow')),
		array(array('row'=>'HtmlTag'),array('tag'=>'div'))
		);
		
		$auftrag_nr=new Zend_Form_Element_Text('auftrag_nr');
		$auftrag_nr->setOptions(array(
	                            'filters'        => array('StringTrim'),
	                            'dojoType'       => array('dijit.form.ComboBox'),
	                            'store'          => 'inStore',
	                			'searchAttr' => 'auftrag_nr',
	                            'autoComplete'   => 'false',
	                            'hasDownArrow'   => 'true',
	                            'label' => '',
								'PromptMessage'		=> '<div style="width:200px">Suchen Sie nach Ihre Auftrag.</div>',
								'style'	=> 'width:400px;height:25px;font-size:18px;',
	                    ));
		
		
		$this->addElements(array($auftrag_nr));
	    
	 }    
}   